{% load static %}
{% load common_extras %}
<!doctype html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>{% block title %}Sider{% endblock %}</title>
    {% block script %}
    <script type="text/javascript" src="{% static 'js/base/jquery-1.7.2.min.js' %}"></script><!--Needed for the prettyPhoto to function-->
    <script type="text/javascript" src="{% static 'js/base/simplepager.js' %}"></script><!--runs the pagination-->
    <script type="text/javascript" src="{% static 'js/user/jquery.js' %}"></script>
    <script type="text/javascript" src="{% static 'js/user/message.js' %}"></script>
    <link rel="stylesheet" href="{% static 'css/prettyPhoto.css' %}" type="text/css" media="screen" title="prettyPhoto main stylesheet" charset="utf-8" />
    <script type="text/javascript">
    $(document).ready(function() {
        $('span.category').hover(function(){
        $(this).next().css('background-color','#e25050');
        },function(){
        $(this).next().css('background-color','#393939');
        });
    });
    </script>
    <!--[if IE]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link href="{% static 'css/style.css' %}" rel="stylesheet" type="text/css" />
    <script src="{% static 'js/base/jquery.prettyPhoto.js' %}" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" charset="utf-8">
  $(document).ready(function(){
    $("a[rel^='prettyPhoto']").prettyPhoto();
  });
</script>
{% endblock %}
</head>

<body>
    {% block wrapper %}
	<div id="wrapper">
      {% block main %}
      <div id="main">
        {% block navigation %}
        <div id="navigation">
                <ul>
                <li><a class="active" href="{% url 'Article:index' %}">Home</a></li>
                <li><a href="">关于</a>
                	<ul>
                    	<li><a href="{% url 'Contact:contact' %}">联系管理员</a></li>
                        <li><a href="">Blank Page</a></li>
                        <li><a href="">Nivo Slider</a></li>
                        <li><a href="">Elastic Slider</a><li>
                     </ul>
                </li>
                <li><a href="{% url 'album:album_page' %}">画廊</a></li>
                <li>{{ request.session.username }}
                    <ul>
                        <li>登录时间：</li>
                        <li>{{ request.session.time }}</li>
                    </ul>
                </li>
                <li><a href="{% url 'user:login' %}">登录</a>
                    <ul>
                        <li><a href="{% url 'user:registe' %}">注册</a></li>
                        <li><a href="{% url 'user:logout' %}">退出</a></li>
                    </ul>
                </li>
            </ul>
        </div><!--END navigation-->
        {% endblock %}
        {% block content %}
        <div id="main-content">

            </div><!--END main-content-->
        {% endblock %}
            </div><!--END main-->
        {% endblock %}
      {% block side %}
      <div id="side">
        {% block sidebar-header %}
    	<div id="sidebar-header">
        	<div id="header">
            	<a href="index-2.html"><span id="logo">Sider<img src="{% static 'images/period.png' %}" alt="period" height="8" width="9" /></span></a>
            </div><!--END header-->
            <span class="border"></span>
            
            <form action="#" method="post">
            	<input type="text" name="search" id="search" placeholder="Search ..." /><br />
            </form>
            
           <span class="border"></span>
           </div><!--END sidebar-header-->
        {% endblock %}
         {% block sidebar-widgets %}
         <div id="sidebar-widgets">
           {% block  widget1 %}
           <div class="widget recentposts">
           	<h3>最新文章</h3>
               {% for i in Articles.object_list %}
                    <ul>
                {% if i.articlephoto %}
            	<li class="thumb"><img src=/media/{{ i.articlephoto }} alt="toons" height="61" width="57" /></li>
                {% endif %}
                <li><span class="title"><a href="/article/news/{{ i.id }}">{% strlength i.content %}</a></span></li>
                <li><span class="date">{{ i.update_time }}</span></li>
            </ul>
                    <span class="widget-border"></span>
                {% endfor %}
           </div><!--END widget-->
           {% endblock %}
           {% block  widget2 %}
           <div class="widget">
           	<h3>最近评论</h3>
             <ul>
                 {% for comment in Comments.object_list %}
            	    <li><span class="title"><a href="/article/news/{{ comment.article_id }}">{% strlength comment.content %}</a></span></li>
                    <li><span class="date">由:<a href="/article/news/{{ comment.article_id }}">{{ comment.commentator }}</a>{{ comment.created }}</span></li>
            	    <li><span class="widget-border"></span></li>
                 {% endfor %}
             </ul>
           </div><!--END widget-->
           {% endblock %}
          {% block  widget3 %}
           <div class="widget cats">
           	<h3>分类</h3>
            <span class="widget-border"></span>
            <ul id="artile">
                {% for list in taglists.object_list %}
                <li >
                    <span data-id="{{ list.id }}">{{ list.tag }}</span>
                </li>
                    <span class="widget-border"></span>
                {% endfor %}
            </ul>

           </div><!--END widget-->
{% endblock %}
           {% block  widget4 %}
           <div class="widget">
           	<h3>图片墙</h3>
               <ul class="gallery">
                   {% for list in paginator_s.object_list %}
                       <li><a href="{{  list.photo.url  }}" rel="prettyPhoto[sidebargallery]" class="gallery"><img src="{{  list.photo.url  }}" alt="blank" height="46" width="46" /></a></li>
                   {% endfor %}
               </ul>
            <span class="widget-border"></span>
           </div><!--END widget-->
           {% endblock %}
        </div><!--END sidebar-widgets-->
         {% endblock %}
		</div><!--END Side--><!--This div keeps the sidebar from floating right when the main content is empty-->
      {% endblock %}
      <div class="clear"></div>
      <div class="push"></div>
        
    </div><!--End wrapper-->
    {% endblock %}
    {% block footer %}
    <div id="footer">
        	<div id="footerwrap">
                {% block footerwidgets1 %}
            	<div class="footerwidgets">
                	<div id="aboutauthor">
                    	<h1 class="title">关于作者</h1>
                        <span class="widget-border"></span>
                        <p>
                            程序员是,自我建立的博客网站，纯属娱乐，禁止侵权
                        </p>
                        
                        <h1 class="title">FOLLOW ME</h1>
                        <span class="widget-border"></span>

                    </div><!--END aboutauthor -->
                    </div><!--END footerwidets-->
                {% endblock %}
                {% block footerwidgets2 %}
                <div class="footerwidgets">
                    <div id="archives">
                    	<h1 class="title">档案</h1>
                        <span class="widget-border"></span>
                        <ul>
                        	<li><a href="#">October 2011</a></li>
                            <li><span class="widget-border"></span></li>
                            <li><a href="#">September 2011</a></li>
                            <li><span class="widget-border"></span></li>
                            <li><a href="#">August 2011</a></li>
                            <li><span class="widget-border"></span></li>
                            <li><a href="#">July 2011</a></li>
                            <li><span class="widget-border"></span></li>
                            <li><a href="#">June 2011</a></li>
                            <li><span class="widget-border"></span></li>
                        </ul>
                    </div><!--END archives-->
                    </div><!--END footerwidets-->
                {% endblock %}
                {% block footerwidgets3 %}
                <div class="footerwidgets">
                    	<div id="flickr">
                    	<h1 class="title">来自画廊</h1>
                        <span class="widget-border "></span>
                            <ul id="social">
                                {% for list in paginator_s.object_list %}
                        	        <li><a href="{{  list.photo.url  }}"><img src="{{  list.photo.url  }}" alt="twitter" height="46" width="46" /></a></li>
                                {% endfor %}
                            </ul>
                         </div><!--END flickr-->
                    </div><!--END footerwidgets-->
                {% endblock %}
                {% block footerwidgets4 %}
                <div class="footerwidgets">
                    	<div id="twitterfeed">
                    	<h1>系统信息</h1>
                        <span class="widget-border"></span>
							<div id="twitter_update_list">
                                <ul>
                                    <li><a>服务器地址</a></li>
                                    <li><span class="widget-border"></span></li>
                                    <li><a>127.0.0.1</a></li>
                                    <li><span class="widget-border"></span></li>
                                    <li><a>操作系统</a></li>
                                    <li><span class="widget-border"></span></li>
                                    <li><a>window10</a></li>
                                    <li><span class="widget-border"></span></li>
                                    <li><a>django版本</a></li>
                                    <li><span class="widget-border"></span></li>
                                    <li><a>4.0.4</a></li>
                                </ul>
           					</div>
                        </div><!--END twitterfeed-->
                    </div><!--END footerwidgets-->
                {% endblock %}
                <div class="clear"></div><!--clearing floats so it doesn't mess with footer border-->
            <span id="footer-border"></span>
                {% block footer-navigation %}
                <div id="footer-navigation">
                	<ul>
                    	<li><a href="{% url 'Article:index' %}">Home</a></li>
                        <li><a href="#">关于</a></li>
                        <li><a href="{% url 'album:album_page' %}">画廊</a></li>
                        <li><a href="#">个人资料</a></li>
                    </ul>
                </div><!--END footer-navigation-->
                {% endblock %}
                {% block copywrite %}
                <div>
                	<span id="copyright">&copy; Copyright 2012, Sider Blog Theme by <a href="http://sc.chinaz.com/">Themebuddies</a></span>
                </div><!--END copywrite-->
                {% endblock %}
            </div><!--END footerwrap-->
            <div class="clear"></div>
        </div><!--END footer-->
    {% endblock %}

</body>

</html>
